﻿using AutoMapper;
using MyCompany.MyProject.IService;
using MyCompany.MyProject.Model.Models;
using MyCompany.MyProject.Repository;
using MyCompany.MyProject.Repository.Base;


namespace MyCompany.MyProject.Service;

public class RoleModulePermissionService : BaseService<RoleModulePermission>, IRoleModulePermissionServices
{
    private readonly IRoleModulePermissionRepository _repository;

    public RoleModulePermissionService(/*IMapper mapper,*/ IBaseRepository<RoleModulePermission> baseRepository,IRoleModulePermissionRepository repository) : base(baseRepository)
    {
        _repository = repository;
    }

    public async Task<List<RoleModulePermission>> RoleModuleMaps()
    {
     return await _repository.RoleModuleMaps();   
    }

    public Task UpdateModuleId(long permissionId, long moduleId)
    {
        return _repository.UpdateModuleId(permissionId, moduleId);
    }
}
